function fnLogin() {
    var u_name = document.getElementById("uname");
    var oError = document.getElementById("error-box1");
    var oError2 = document.getElementById("error-box2");
    var u_pwd = document.getElementById("pwd");
    var isoError = true;
    oError.innerHTML = "<br>";
    oError2.innerHTML = "<br>";


    if (u_name.value.length < 3 || u_name.value.length > 20 || u_name.value == '') {
        oError.innerHTML = "请输入3-20位的用户名";
        isoError = false;
        return;

    }
    if (u_pwd.value.length < 3 || u_pwd.value.length > 1000 || u_pwd.value == '') {
        oError2.innerHTML = "请输入3-16位的密码";
        isoError = false;
        return;

    }else{
        var salt ="springbootdemo";
        var newPassword = $.md5($("#pwd").val()+ salt); // 前端密码加密
        console.log("login md5 new pwd:" + newPassword)
        $("#pwd").val(newPassword); // reset password to input value

        $("#loginForm").submit();
    } 
}
